<?php get_header(); 
global $wp_query;
?>
<div class="container" id="top_info">
	<div class="top-content">&nbsp;</div>
    <div class="top-curve">&nbsp;</div>
</div>

<div class="container">
	<div class="page-filler">&nbsp;</div>
	
 	<div class="page-content padded">
	
	<div class="search-form-container">
	 	<div class="result-notice"> <?php echo  $wp_query->found_posts; ?> results for "<?php echo get_search_query() ?>" </div>
	</div>
	
	<ul class="search-site">
	<?php while ( have_posts() ) : the_post(); ?>
		<?php 
			$post_type = get_post_type( get_the_ID() ); 
			if( $post_type == 'dmci_projects')
				$post_type = 'Project';
			if( $post_type == 'dmci_cons_update' )
				$post_type = 'Project Update';
		?>
		<li>
			<div class="title"><?php echo the_title(); ?></div>
			<div class="desc"><?php echo get_post_meta($post->ID, 'dmci_short_project_desc', true) . ' [...]'?></div>
			<a href="<?php echo get_permalink(); ?>" class="explore"><span class="arrow">></span>Explore <?php echo $post_type; ?></a>
		</li>
	 <?php endwhile;?>
	</ul>
	<div class="pagination">
		<?php

			$big = 999999999; // need an unlikely integer

			echo paginate_links( array(
				'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
				'format' => '?paged=%#%',
				'current' => max( 1, get_query_var('paged') ),
				'total' => $wp_query->max_num_pages
			) );
		?>
	</div>
 	</div>
</div>
<?php get_footer(); ?>